package com.Stash.Service.impl;

import com.Stash.Dao.Admin;
import com.Stash.Domain.*;
import com.Stash.Service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired // 自动装配其他bean
    private Admin admin;

    @Override
    public List<Classification> classificationLimit(Page page) {
        List<Classification> classifications = admin.classificationLimit(page);
        return classifications;
    }

    @Override
    public void classificationAdd(Classification classification) {
        admin.classificationAdd(classification);
    }

    @Override
    public Classification classificationSelectName(Classification classification) {
        Classification classifications = admin.classificationSelectName(classification);
        return classifications;
    }

    @Override
    public void classificationUpdateName(Classification classification) {
        admin.classificationUpdateName(classification);
    }

    @Override
    public List<Stash> StashSelectAll() {
        List<Stash> stashes = admin.StashSelectAll();
        return stashes;
    }

    @Override
    public void StashAdd(Stash stash) {
        admin.StashAdd(stash);
    }

    @Override
    public void stashUpdateInformation(Stash stash) {
        admin.stashUpdateInformation(stash);
    }

    @Override
    public Stash StashSelectAId(Stash stash) {
        Stash stash1 = admin.StashSelectAId(stash);
        return stash1;
    }

    @Override
    public List<admins> AdminSelectAll() {
        List<admins> admins = admin.AdminSelectAll();
        return admins;
    }

    @Override
    public List<admins> AdminSelectLimit(Page page) {
        List<admins> admins = admin.AdminSelectLimit(page);
        return admins;
    }

    @Override
    public void AdminUpdate(admins admins) {
        admin.AdminUpdate(admins);
    }

    @Override
    public admins AdminSelect(admins admins) {
        admins admins1 = admin.AdminSelect(admins);
        return admins1;
    }

    @Override
    public void AdminAdd(admins admins) {
        admin.AdminAdd(admins);
    }

    @Override
    public admins AdminSelectPhone(admins admins) {
        admins admins1 = admin.AdminSelectPhone(admins);
        return admins1;
    }

    @Override
    public admins AdminSelectP(admins admins) {
        admins admins1 = admin.AdminSelectP(admins);
        return admins1;
    }

    @Override
    public void DeleteClass(Integer ClassificationId) {
        admin.DeleteClass(ClassificationId);
    }

    @Override
    public  List<ProductClass> SelectClassificationProductAll(Integer classificationId) {
        List<ProductClass> productClass = admin.SelectClassificationProductAll(classificationId);
        return  productClass;
    }
}
